home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / dpmigcc5.zip / RSX / SOURCE / TERMIO.H < prev    next >
C/C++ Source or Header  |  1994-12-12  |  4KB  |  155 lines

  1. #ifndef _RSX_TERMIO_H
  2. #define _RSX_TERMIO_H
  3.  
  4. /* fcntl */
  5. #define F_GETFL     1     /* read flags : O_APPEND,O_NDELAY */
  6. #define F_SETFL     2     /* set flags */
  7. #define F_GETFD     3
  8. #define F_SETFD     4
  9.  
  10. /* fcntl codes */
  11. #define FCNTL_NDELAY        0x04
  12. #define FCNTL_APPEND        0x08
  13.  
  14. /* ioctl device */
  15. #define HT_FILE     0
  16. #define HT_UPIPE    1
  17. #define HT_NPIPE    2
  18. #define HT_DEV_OTHER    3
  19. #define HT_DEV_NUL    4
  20. #define HT_DEV_CON    5
  21. #define HT_DEV_CLK    7
  22.  
  23. /* ioctl codes */
  24. #define FIONREAD   16
  25. #define FGETHTYPE  32
  26.  
  27. /* request codes */
  28. #define TCGETA        1
  29. #define TCSETA        2
  30. #define TCSETAW     3
  31. #define TCSETAF     4
  32. #define TCFLSH        5
  33.  
  34. /* c_cc indexes */
  35.  
  36. #define VINTR        0
  37. #define VQUIT        1
  38. #define VERASE        2
  39. #define VKILL        3
  40. #define VEOF        4
  41. #define VEOL        5
  42. #define VMIN        6
  43. #define VTIME        7
  44.  
  45. #define NCC        8    /* Number of the above */
  46.  
  47. /* c_iflag, emx ignores most of the following bits */
  48.  
  49. #define IGNBRK        0x0001
  50. #define BRKINT        0x0002
  51. #define IGNPAR        0x0004
  52. #define PARMRK        0x0008
  53. #define INPCK        0x0010
  54. #define ISTRIP        0x0020
  55. #define INLCR        0x0040
  56. #define IGNCR        0x0080
  57. #define ICRNL        0x0100
  58. #define IUCLC        0x0200
  59. #define IXON        0x0400
  60. #define IXANY        0x0800
  61. #define IXOFF        0x1000
  62. #define IDELETE     0x8000  /* emx */
  63.  
  64. /* c_oflag, emx ignores all of the following bits */
  65.  
  66. #define OPOST        0x0001
  67. #define OLCUC        0x0002
  68. #define ONLCR        0x0004
  69. #define OCRNL        0x0008
  70. #define ONOCR        0x0010
  71. #define ONLRET        0x0020
  72. #define OFILL        0x0040
  73. #define OFDEL        0x0080
  74. #define NLDLY        0x0100 /* mask */
  75. #define NL0        0x0000
  76. #define NL1        0x0100
  77. #define CRDLY        0x0600 /* mask */
  78. #define CR0        0x0000
  79. #define CR1        0x0200
  80. #define CR2        0x0400
  81. #define CR3        0x0600
  82. #define TABDLY        0x1800 /* mask */
  83. #define TAB0        0x0000
  84. #define TAB1        0x0800
  85. #define TAB2        0x1000
  86. #define TAB3        0x1800
  87. #define BSDLY        0x2000 /* mask */
  88. #define BS0        0x0000
  89. #define BS1        0x2000
  90. #define VTDLY        0x4000 /* mask */
  91. #define VT0        0x0000
  92. #define VT1        0x4000
  93. #define FFDLY        0x8000 /* mask */
  94. #define FF0        0x0000
  95. #define FF1        0x8000
  96.  
  97. /* c_cflag, emx ignores all of the following bits */
  98.  
  99. #define CBAUD        0x000f /* mask */
  100. #define B0        0x0000
  101. #define B50        0x0001
  102. #define B75        0x0002
  103. #define B110        0x0003
  104. #define B134        0x0004
  105. #define B150        0x0005
  106. #define B200        0x0006
  107. #define B300        0x0007
  108. #define B600        0x0008
  109. #define B1200        0x0009
  110. #define B1800        0x000a
  111. #define B2400        0x000b
  112. #define B4800        0x000c
  113. #define B9600        0x000d
  114. #define B19200        0x000e
  115. #define B38400        0x000f
  116. #define CSIZE        0x0030 /* mask */
  117. #define CS5        0x0000
  118. #define CS6        0x0010
  119. #define CS7        0x0020
  120. #define CS8        0x0030
  121. #define CSTOPB        0x0040
  122. #define CREAD        0x0080
  123. #define PARENB        0x0100
  124. #define PARODD        0x0200
  125. #define HUPCL        0x0400
  126. #define CLOCAL        0x0800
  127. #define LOBLK        0x1000
  128.  
  129. /* c_lflag, emx ignores some of the following bits */
  130.  
  131. #define ISIG        0x0001
  132. #define ICANON        0x0002
  133. #define XCASE        0x0004
  134. #define ECHO        0x0008
  135. #define ECHOE        0x0010
  136. #define ECHOK        0x0020
  137. #define ECHONL        0x0040
  138. #define NOFLSH        0x0080
  139. #define IDEFAULT    0x8000  /* emx */
  140.  
  141. struct termio
  142. {
  143.   unsigned long  c_iflag;
  144.   unsigned long  c_oflag;
  145.   unsigned long  c_cflag;
  146.   unsigned long  c_lflag;
  147.   unsigned long  c_line;
  148.   unsigned char c_cc[NCC];
  149. } ;
  150.  
  151. int    kbd_ioctl ( unsigned, unsigned long );
  152. int    termio_read ( unsigned, unsigned long, int );
  153.  
  154. #endif /* _RSX_TERMIO_H */
  155.